package com.zky.seckill.kill.feign;

import com.zky.common.entity.GoodsEntity;
import com.zky.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("group-shop")
@RequestMapping("/groupshop/goods")
public interface GoodsFeignService {

    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params);

    @RequestMapping("/info/{goodsId}")
//    @RequiresPermissions("groupshop:goods:info")
    public R info(@PathVariable("goodsId") Long goodsId);

    /**
     * 修改
     */
    @RequestMapping("/update")
//    @RequiresPermissions("groupshop:goods:update")
    public R update(@RequestBody GoodsEntity goods);

}
